package com.yan.watch.jdk;

import java.util.Observable;

@SuppressWarnings("all")
public class WeChatOfficialAccount extends Observable {
    private String name;

    public WeChatOfficialAccount(String name) {
        this.name = name;
    }

    public void publish(String title, String content) {
        System.out.println("===========================");
        String publishContent = "公众号" + name + "发布了文章" + title + "," +
                "\n全文：\n" + content;
        this.setChanged();
        this.notifyObservers(publishContent);
    }
}
